import upload from '@/utils/upload'
import request from '@/utils/request'

const dispatchApi = {
	// 新建供应链发货地
	addSupplyDispatch: (data) => {
		return request({
      url: `/vms/supplier-deliver-place/addBySupplyChain`,
			method: 'POST',
      data
		})
	},
  // 新建供应商发货地
  addSupplierDispatch: (data) => {
  	return request({
      url: `/vms/supplier-deliver-place/create`,
  		method: 'POST',
      data
  	})
  },
  // 修改供应链发货地
  updatetSupplyDispatch: (data) => {
    return request({
      url: `/vms/supplier-deliver-place/updateBySupplyChain`,
    	method: 'PUT',
      data
    })
  },
  // 修改供应商发货地
  updatetSupplierDispatch: (data) => {
    return request({
      url: `/vms/supplier-deliver-place/update`,
    	method: 'PUT',
      data
    })
  },
  // 供应链发货地列表
  pageBySupplyChain: (data) => {
  	return request({
      url: `/vms/supplier-deliver-place/pageBySupplyChain?pageNo=${data.pageNo}&pageSize=${data.pageSize}&supplyChainId=${data.supplyChainId}`,
  		method: 'GET'
  	})
  },
  // 供应商发货地列表
  pageBySupplierList: (data) => {
    return request({
      url: `/vms/supplier-deliver-place/page?pageNo=${data.pageNo}&pageSize=${data.pageSize}&supplierId=${data.supplyChainId}`,
    	method: 'GET',
    })
  },
  // 获取发货地
  getDispatchInfo: (data) => {
    return request({
      url: `/vms/supplier-deliver-place/get?id=${data}`,
    	method: 'GET',
    })
  },
  
  
}
export default dispatchApi